<?php
class combo extends CI_Controls{

	/**
	 * $options['value']=>texto
	 * $options['value2']=>texto2
	 *
	 * @var Array
	 */
	public $options=array();

	function __construct(){
		parent::__construct();
	}

	function drawContent(){

		$combo='';
		$combo.='<select ';
		$combo.=$this->parseAtributos();
		$combo.='>';
		foreach ($this->options as $key=>$texto){
			$combo.='<option value='.$key;
			if($this->value==$key){
				$combo.=' selected';
			}
			$combo.='>';
			$combo.=$texto;
			$combo.='</option>';
		}
		$combo.='</select>';
		return $combo;
	}

}